public int GetHashCode(coordinate obj) { if (obj == null) return 0; return obj.x.GetHashCode() ^ obj.y.GetHashCode(); }